﻿<Activity mc:Ignorable="sads sap" x:Class="OrderHandlingWorkflow.Workflow1"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:local="clr-namespace:OrderHandlingWorkflow"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=System"
 xmlns:s2="clr-namespace:System;assembly=System.Xml"
 xmlns:s3="clr-namespace:System;assembly=System.Core"
 xmlns:s4="clr-namespace:System;assembly=System.ServiceModel"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System"
 xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel"
 xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core"
 xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sd="clr-namespace:System.Data;assembly=System.Data"
 xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
 xmlns:st="clr-namespace:System.Text;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="order" Type="InArgument(local:Order)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>273,498</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <sap:WorkflowViewStateService.ViewState>
    <scg3:Dictionary x:TypeArguments="x:String, x:Object">
      <x:Boolean x:Key="ShouldCollapseAll">True</x:Boolean>
      <x:Boolean x:Key="ShouldExpandAll">False</x:Boolean>
    </scg3:Dictionary>
  </sap:WorkflowViewStateService.ViewState>
  <Sequence DisplayName="Order handling" sad:XamlDebuggerXmlReader.FileName="C:\Users\brian.pilgren\Documents\Visual Studio 2010\Projects\WorkflowConsoleApplicationTest\OrderHandlingWorkflow\Workflow1.xaml" sap:VirtualizedContainerService.HintSize="233,458">
    <sap:WorkflowViewStateService.ViewState>
      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg3:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <WriteLine DisplayName="Recieve order" sap:VirtualizedContainerService.HintSize="211,61" Text="Order recieved">
      <sap:WorkflowViewStateService.ViewState>
        <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
        </scg3:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
    </WriteLine>
    <Parallel DisplayName="Check order" sap:VirtualizedContainerService.HintSize="211,51">
      <sap:WorkflowViewStateService.ViewState>
        <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg3:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <Sequence DisplayName="Check payment" sap:VirtualizedContainerService.HintSize="486,603">
        <Sequence.Variables>
          <Variable x:TypeArguments="x:Boolean" Default="True" Name="paymentApporved" />
        </Sequence.Variables>
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <Delay Duration="[TimeSpan.FromSeconds(2)]" sap:VirtualizedContainerService.HintSize="464,22" />
        <If Condition="[order.PaymentApproved]" DisplayName="If payment approved" sap:VirtualizedContainerService.HintSize="464,208">
          <sap:WorkflowViewStateService.ViewState>
            <scg3:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsPinned">False</x:Boolean>
            </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <If.Then>
            <WriteLine sap:VirtualizedContainerService.HintSize="211,61" Text="Payment approved" />
          </If.Then>
          <If.Else>
            <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="Payment not approved" />
          </If.Else>
        </If>
      </Sequence>
      <Sequence DisplayName="Check items" sap:VirtualizedContainerService.HintSize="516,603">
        <Sequence.Variables>
          <Variable x:TypeArguments="x:Boolean" Default="True" Name="inStock" />
        </Sequence.Variables>
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <Delay Duration="[TimeSpan.FromSeconds(4)]" sap:VirtualizedContainerService.HintSize="494,22" />
        <ForEach x:TypeArguments="local:Item" DisplayName="ForEach&lt;Item&gt;" sap:VirtualizedContainerService.HintSize="494,316" Values="[order.Items]">
          <sap:WorkflowViewStateService.ViewState>
            <scg3:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsPinned">False</x:Boolean>
            </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <ActivityAction x:TypeArguments="local:Item">
            <ActivityAction.Argument>
              <DelegateInArgument x:TypeArguments="local:Item" Name="item" />
            </ActivityAction.Argument>
            <If Condition="[order.AllItemsInStock]" DisplayName="If item in stock" sap:VirtualizedContainerService.HintSize="464,208">
              <sap:WorkflowViewStateService.ViewState>
                <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                  <x:Boolean x:Key="IsPinned">False</x:Boolean>
                </scg3:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
              <If.Else>
                <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="Some item not in stock" />
              </If.Else>
            </If>
          </ActivityAction>
        </ForEach>
        <WriteLine sap:VirtualizedContainerService.HintSize="494,61" Text="All items in stock">
          <sap:WorkflowViewStateService.ViewState>
            <scg3:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
        </WriteLine>
      </Sequence>
    </Parallel>
    <Parallel DisplayName="Process order" sap:VirtualizedContainerService.HintSize="211,51">
      <sap:WorkflowViewStateService.ViewState>
        <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
        </scg3:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <Sequence DisplayName="Process payment" sap:VirtualizedContainerService.HintSize="233,247">
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <Delay Duration="[TimeSpan.FromSeconds(2)]" sap:VirtualizedContainerService.HintSize="211,22" />
        <WriteLine sap:VirtualizedContainerService.HintSize="211,61" Text="Payment processed" />
      </Sequence>
      <Sequence DisplayName="Process items" sap:VirtualizedContainerService.HintSize="233,247">
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <Delay Duration="[TimeSpan.FromSeconds(10)]" sap:VirtualizedContainerService.HintSize="211,22" />
        <WriteLine sap:VirtualizedContainerService.HintSize="211,61" Text="Order ready to ship" />
      </Sequence>
    </Parallel>
    <Sequence DisplayName="Ship order" sap:VirtualizedContainerService.HintSize="211,51">
      <sap:WorkflowViewStateService.ViewState>
        <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
        </scg3:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <Delay Duration="[TimeSpan.FromSeconds(2)]" sap:VirtualizedContainerService.HintSize="211,22" />
      <WriteLine DisplayName="Ship order" sap:VirtualizedContainerService.HintSize="211,61" Text="Order shipped">
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </WriteLine>
    </Sequence>
  </Sequence>
</Activity>